/*
 * Powered By [rapid-framework]
 * Web Site: http://www.rapid-framework.org.cn
 * Google Code: http://code.google.com/p/rapid-framework/
 * Since 2008 - 2010
 */

package com.osgix.authorize.model;

import org.apache.commons.lang.builder.EqualsBuilder;
import org.apache.commons.lang.builder.HashCodeBuilder;
import org.apache.commons.lang.builder.ToStringBuilder;
import org.apache.commons.lang.builder.ToStringStyle;

import com.osgix.common.pojo.BaseEntity;

public class PrivilegeResource extends BaseEntity implements java.io.Serializable {
	private static final long serialVersionUID = 5454155825314635342L;

	// alias
	public static final String TABLE_ALIAS = "PrivilegeResource";
	public static final String ALIAS_PRIVILEGE_RESOURCE = "privilegeResource";
	public static final String ALIAS_PRIVILEGE_ID = "privilegeId";
	public static final String ALIAS_RESOURCE_ID = "resourceId";

	// date formats

	// 可以直接使用: @Length(max=50,message="用户名长度不能大于50")显示错误消息
	// columns START

	private Long privilegeResource;

	private Long privilegeId;

	private Long resourceId;

	// columns END

	public PrivilegeResource() {
	}

	public PrivilegeResource(Long privilegeResource) {
		this.privilegeResource = privilegeResource;
	}

	public void setPrivilegeResource(Long value) {
		this.privilegeResource = value;
	}

	public Long getPrivilegeResource() {
		return this.privilegeResource;
	}

	public void setPrivilegeId(Long value) {
		this.privilegeId = value;
	}

	public Long getPrivilegeId() {
		return this.privilegeId;
	}

	public void setResourceId(Long value) {
		this.resourceId = value;
	}

	public Long getResourceId() {
		return this.resourceId;
	}

	public String toString() {
		return new ToStringBuilder(this, ToStringStyle.MULTI_LINE_STYLE)
				.append("PrivilegeResource", getPrivilegeResource()).append("PrivilegeId", getPrivilegeId())
				.append("ResourceId", getResourceId()).toString();
	}

	public int hashCode() {
		return new HashCodeBuilder().append(getPrivilegeResource()).toHashCode();
	}

	public boolean equals(Object obj) {
		if (obj instanceof PrivilegeResource == false)
			return false;
		if (this == obj)
			return true;
		PrivilegeResource other = (PrivilegeResource) obj;
		return new EqualsBuilder().append(getPrivilegeResource(), other.getPrivilegeResource()).isEquals();
	}
}
